package com.zhc.dejingapi.controller;


import com.zhc.dejingapi.common.result.Result;
import com.zhc.dejingapi.entity.vo.QingProcessPlanEntityVo;
import com.zhc.dejingapi.service.QingZbProcessPlanService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhc
 * @since 2024-10-08
 */
@RestController
@RequestMapping("/qing-zb-processPlan-entity")
public class QingZbProcessPlanController {
    @Resource
    private QingZbProcessPlanService qingZbProcessPlanService;

    @PostMapping("/addProcessPlan")
    public Result addProcessPlan(@RequestBody QingProcessPlanEntityVo qingProcessPlanEntity) {
        return qingZbProcessPlanService.addProcessPlan(qingProcessPlanEntity);
    }

    @PostMapping("/updateProcessPlan")
    public Result updateProcessPlan(@RequestBody QingProcessPlanEntityVo qingProcessPlanEntity) {
        return qingZbProcessPlanService.updateProcessPlan(qingProcessPlanEntity);
    }

    @PostMapping("/updateProcessPlan/{mainId}/{planEndTime}")
    public Result updateProcessPlan(@PathVariable Long mainId,@PathVariable String planEndTime) {
        return qingZbProcessPlanService.updateProcessPlan(mainId,planEndTime);
    }


}
